﻿using JNPF.Basics.Models;
using JNPF.Utils;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace JNPF.Basics.Logic
{
    /// <summary>
    /// 
    /// </summary>
    public interface PortalIService
    {
        /// <summary>
        /// 获取列表
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<PortalEntity>> GetList(PageInput input);

        /// <summary>
        /// 获取列表
        /// </summary>
        /// <returns></returns>
        Task<List<PortalEntity>> GetList();

        /// <summary>
        /// 获取门户信息
        /// </summary>
        /// <param name="id">主键id</param>
        /// <returns></returns>
        Task<PortalEntity> GetInfo(string id);

        /// <summary>
        /// 创建
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<int> Create(PortalEntity entity);

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="id">主键值</param>
        /// <param name="entity">实体对象</param>
        Task<int> Update(PortalEntity entity);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<int> Delete(PortalEntity entity);
    }
}
